#!/bin/bash 

read -p "please input you remote ip address:" u_ip

ssh root@${u_ip} "df -Th |tr -s ' ' ','"
ssh root@${u_ip} "top -bcn 1 |head -n 4 |tail -n +3|tr -s ' '"

ssh root@${u_ip} df -Th |tr -s ' ' ',' >>infor.csv
cpu=`top -bcn 1|head -n 4 |tail -n +3`
ssh root@${u_ip} "${cpu}" >>infor.csv

